﻿using System;
using System.Linq;
using Landpy.CruiseControlNet.FacadeInterface.ConfigurationModule;
using Landpy.CruiseControlNet.FacadeInterface.RepositoryModule;
using Landpy.CruiseControlNet.Infrastructure.Aop.WrapAttribute;

namespace Landpy.CruiseControlNet.DomainLayer.RepositoryModule
{
    public class TaskRepository : ITaskRepository
    {
        [NotThrowException]
        [ExceptionMessageBox]
        [LogException]
        public Task GetTaskById(Project project, Guid id)
        {
            return (from Task task in project.Tasks
                    where task.Id == id
                    select task).FirstOrDefault();
        }
    }
}